package com.pingan.cashier.web.resp;

import com.pingan.cashier.common.config.Constants;
import lombok.Data;

@Data
public class CommonResp {

    /**
     * 返回码
     */
    private String code;

    /**
     * 返回消息
     */
    private String message;

    /**
     * 成功
     *
     * @return
     */
    public static final CommonResp success() {
        CommonResp resp = new CommonResp();
        resp.setCode(Constants.success);
        resp.setMessage(Constants.success_message);
        return resp;
    }
    public static final CommonResp fail() {
        CommonResp resp = new CommonResp();
        resp.setCode(Constants.fail);
        resp.setMessage(Constants.fail_message);
        return resp;
    }
}
